#encoding=utf-8
"""封装公共类方法
"""
from Driver import *
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time


def swip_left(self, num, driver):
    x = driver.get_window_size()["width"]
    y = driver.get_window_size()["height"]
    x1 = x * 0.75
    y1 = y * 0.5
    x2 = x * 0.05
    try:
        for i in range(num):
            driver.swipe(x1, y1, x2, y1, 1000)
            time.sleep(10)
        print("启屏页滑动结束")
    except:
        print("启屏页滑动异常")
